<div class="page" data-page="wareHousePickupList" id="wareHousePickupList">
	<p class="location">
		当前位置: 提货申请 > 提货列表
	</p>
<!--  	<div class="serchBox">
		
	</div>  -->
	<div class="table-search">
			<div class="searchDataLine">
				<div>
					提单号：<input placeholder="请输入提单号" name="pickupNumber" class="pickupNumber" type="text" />
				</div>
				<div>
					制单人：<input placeholder="请输入制单人" name="creator" class="creator" type="text" />
				</div>
				<div>
					制单时间：<input class="Wdate FromTime" type="text"
						id="applyTimeStart" name="dateBegin" placeholder="请选择时间"
							onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false,readOnly:true,maxDate:'#F{$dp.$D(\'applyTimeEnd\',{d:0})}'})" style="width: 98px;"/>-<input
						class="Wdate ToTime" type="text" id="applyTimeEnd" name="dateEnd" placeholder="请选择时间"
							onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false,readOnly:true,minDate:'#F{$dp.$D(\'applyTimeStart\',{d:1})}'})" style="width: 98px;"/>
				</div>
				
			</div>
			<div class="searchDataLine">
				<div>
					委托方：<select isNull="1" codeName="委托方" name="enterpriseId" style="width: 170px;"><option value="">请选择</option></select>
				</div>
				<div>
					买家：<input placeholder="请输入买家" name="buyer" class="buyer" type="text" />
				</div>
				<div>
					提货时间：<input class="Wdate FromTime" type="text"
							id="applyTimeStart" name="dateBegin2" placeholder="请选择时间"
								onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false,readOnly:true,maxDate:'#F{$dp.$D(\'applyTimeEnd\',{d:0})}'})" style="width: 98px;"/>-<input
							class="Wdate ToTime" type="text" id="applyTimeEnd" name="dateEnd2" placeholder="请选择时间"
								onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false,readOnly:true,minDate:'#F{$dp.$D(\'applyTimeStart\',{d:1})}'})" style="width: 98px;"/>
				</div>
			</div>
			<div class="searchDataLine">
				<div>
					融资编号：<input placeholder="请输入融资编号" name="financeNumber" type="text" />
				</div>
				<div>
					仓库：<input placeholder="请输入仓库名称" name="warehouseName" type="text" />
					<!--业务类型：
					<select name="productType">
						<option value="">全部</option>
						<option value="5">代理采购</option>
						<option value="6">代理销售</option>
					</select>-->
				</div>
				<div>
					状态:<select name="pickupState" style="margin-right: 35px;">
							<option value="">全部</option>
							<option value="[0,2,3,4,5,6,7,8,9,10]">待办</option>
							<option value="[1,12,13]">已办</option>
							<option value="0">待提交</option>
							<option value="1">已取消</option>
							<option value="2">初审中</option>
							<option value="3">合同待上传</option>
							<option value="4">合同待提交</option>
							<option value="5">待客户签署</option>
							<option value="6">待平台签署</option>
							<option value="7">合同待确认</option>
							<option value="8">合同已打回</option>
							<option value="9">平台已签署</option>
							<option value="10">政审中</option>
							<option value="11">待放货</option>
							<option value="12">已放货</option>
							<option value="13">审批拒绝</option>
						</select>
					<a class="table-search-button seatchButon" id="accountRecordApplySearchButton" action="inquireFinancePickupApplicationWarehousePageList.json" style="margin-top:3px;">查询</a>
				</div>
			</div>
		</div>
		<table class="outerTable">
			
		</table> 
		<div class="pagerCon"></div>
		<script type="text/template">
			<tr style="border-bottom: solid 1px #CCC;">
				<th>No</th>
				<th>融资编号</th>
				<th>业务类型</th>
				<th>货物名称</th>
				<th>仓库</th>
				<th>剩余监管量(吨)</th>
				<th>提货量(吨)</th>
				<th>本金(元)</th>
				<th>服务费(元)</th>
				<th>其他(元)</th>
				<th>总金额(元)</th>
				<th>状态</th>
				<th>操作</th>
			</tr>
			<tr style="border: none;">
				<td style="padding: 5px 0; border: none;" colspan="13" style="border: none;"></td>
			</tr>
			{@each datas as it, index}
				<tr class="bulkstockData2" pickupId="${it.pickupId}" enterpriseId="${it.enterpriseId}" productType="${it.productType}" pickupNumber="${it.pickupNumber}" pickupNumber1="${it.pickupNumber}" index="${index*1 + 1}">
					<td rowspan="${it.bulkstockList.length*1+ 2}">${index*1 + 1}</td>
					<td colspan="12" style="text-align: right;">
						<span style="float: left; margin-right: 10px;">提单号: <a href="javascript:void(0);" class="pickups_num">${it.pickupNumber}</a></span> <span style="float: left;">委托方: <a href="javascript:void(0);" class="enter_name">${it.enterpriseName}</a></span> 制单人：${it.creator} 制单时间：${it.createDateTime}  最后修改人：${it.updator} 修改时间：${it.updateDateTime}
					</td>
				</tr>
				${aa = 0}
					{@each it.bulkstockList as that}
					${aa = aa*1 + that.pickupAmount}
					{@/each}
					{@each it.bulkstockList as item,i2}

					<tr class="bulkstockData" warehouseId="${item.warehouseId}" pickupNumber="${it.pickupNumber}" pickupId="${it.pickupId}" financeId="${item.financeId}" pickupState="${it.pickupState}" productType="${it.productType}" {@if it.bulkstockList.length > 1}style="border-bottom: solid 1px #CCC;" {@else} style="line-height: 35px;" {@/if}>
						<td><a href="javascript:void(0);" class="order_num">${item.financeNumber}</a><span class="showFinanceDetail" style="cursor: pointer;color: blue;" pickupNumber="${it.pickupNumber}" index="${index*1 + 1}">&nbsp;&nbsp;[+]</span><br/>${item.financeApplicationDate}</td><td>${getValueByKey(7, item.productType)}</td><td>${item.bulkstockName}(${item.specifician})</td><td>${item.warehouseName}</td><td>${item.supervisionQuantity}</td><td>${item.pickupQuantity}</td><td>${formatCurrency(item.bulkstockAmount)}</td><td>${formatCurrency(item.interest)}</td><td>${formatCurrency(item.others)}</td>
					{@if i2 == 0} 
						<td style="border: solid 1px #CCC;" class="sum" rowspan="${it.bulkstockList.length}">${formatCurrency((aa).toFixed(2))}</td>
						<td style="border: solid 1px #CCC;" rowspan="${it.bulkstockList.length}">${getValueByKey(82, it.pickupState)}{@if it.pickupState != 1 && it.pickupState != 3 && it.pickupState != 4 && it.pickupState != 5 && it.pickupState != 6 && it.pickupState != 7 && it.pickupState != 8 && it.pickupState != 9 } {@if it.finalNode != null && it.finalNode != ""}<br />${it.finalNode}{@if it.outplanFlag == 1}审核{@else}{@/if}</td>{@/if}{@/if}
						<td class="operation" style="border: solid 1px #CCC;" rowspan="${it.bulkstockList.length}">
							<div style="display: inline-block;">
								{@each it.bulkstockList as t}
								{@if it.pickupState == 12}
								<a warehouseId="${t.warehouseId}" pickupNumber="${it.pickupNumber}" href="javascript:void(0);" class="ouInfo">出库信息</a><br />
								{@/if}
								{@/each}
							</div>

							<a href="javascript:void(0);" class="detail">详情</a> <!--<a href="javascript:void(0);" class="careful">进入政审</a>-->

							{@if it.pickupState == 0}
							<a href="javascript:void(0);" class="update">修改</a> <a class="submitApplication" href="javascript:void(0);">提交</a> <a class="cancel" href="javascript:void(0);">取消</a>
							{@else if it.pickupState == 2}
							<a href="javascript:void(0);" class="audit">进入初审</a>
							{@else if it.pickupState == 3}
							<a href="javascript:void(0);" class="upload">合同上传</a>
							{@else if it.pickupState == 4}
							<a href="javascript:void(0);" class="upload">合同上传</a> <a href="javascript:void(0);" class="submit">合同提交</a>
							{@else if it.pickupState == 5}
							<a href="javascript:void(0);" class="documentSign_s2">客户签署</a>
							{@else if it.pickupState == 6}
							<a href="javascript:void(0);" class="platformSign">合同签署</a>
							{@else if it.pickupState == 7}
							<a href="javascript:void(0);" class="contractConfirm">合同确认</a>
							{@else if it.pickupState == 8}
							<a href="javascript:void(0);" class="upload">合同上传</a>
							{@else if it.pickupState == 10}
							<a href="javascript:void(0);" class="careful">进入政审</a>
							{@else if it.pickupState == 11 && it.outplanFlag == 1}
							<a href="javascript:void(0);" class="release">解除监管</a>
							{@/if}
							{@if it.pickupState != 6 && it.pickupState1 == 6}
							<a href="javascript:void(0);" class="platformSign">合同签署</a>
							{@/if}
						</td>
						{@/if}
					</tr>
					<tr class="trFinanceDetail" isNull="" style="display: none;">
						<td colspan="9" style="background: #FAFAFA;">
							<div class="financeInfo">
								<div class="dataLine">
									<div>
										放款时间：<span class="data" name="loanDate"></span>
									</div>
									<div>
										放款金额：<span class="data" name="loanAmount"></span>
									</div>
								</div>
								<div class="dataLine">
									<div>
										费率(%)：<span class="data" name="intrerst"></span>
									</div>
									<div>
										质押率(%)：<span class="data" name="pledgeRate"></span>
									</div>
								</div>
								<div class="dataLine">
									<div>
										用款期限：<span class="data" name="financeDays"></span>
									</div>
									<div>
										货物单价：<span class="data" name="bulkstockPrice"></span>
									</div>
								</div>
								<div class="dataLine">
									<div>
										融资单价：<span class="data" name="financePrice"></span>
									</div>
									<div>
									</div>
								</div>
							</div>
						</td>
					</tr>
					{@/each}
				<tr>
					<td colspan="13">
						{@if it.productType == 6}
						<span style="float: left;">买家：${it.buyer}</span>
						{@/if}
						<span style="float: right;"> 送货地址：${it.deliveryAddress} 提货方式：${getValueByKey(81, it.pickupMethod)} 提货时间：${(it.pickupDate).substr(0, 10)}</span>
					</td>
				</tr>
				<tr style="border: none;">
					<td style="padding: 5px 0; border: none;" colspan="13" style="border: none;"></td>
				</tr>
			{@/each}
		</script>
</div>